<!--
 * @Author: 胡海
 * @Date: 2020-11-22 16:46:48
 * @LastEditors: 胡海
 * @LastEditTime: 2020-11-22 16:49:54
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基础指令</title>
    <script src="../vue/src/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="password"  id="pass" value="123" />
        <p v-html="message"></p>
    </div>

    <script>

        var message = `<div>hello,我很友善</div><img src="./a.jpg" 
        onerror="console.log(document.getElementById('pass').value);" />`;

        var vm = new Vue({
            el: '#app',
            data:{
                message
            }
        })	

    </script>

</body>
</html>